<!DOCTYPE html>
<html>
<head>
    <title></title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
            <div class="buttons-group">
                #if($shiro.hasPermission("textconfig:info"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;查看</i-button>
                #end
                #if($shiro.hasPermission("textconfig:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("textconfig:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("textconfig:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
		<i-form ref="formValidate" :model="textConfig" :rules="ruleValidate" :label-width="80">
            <Form-item label="标题" prop="title">
                <i-input v-model="textConfig.title" placeholder="标题"/>
            </Form-item>
            <Form-item label="内容" prop="content">
                <i-input type="textarea" v-model="textConfig.content" placeholder="内容"/>
            </Form-item>
            <Form-item label="底部" prop="bottom">
                <i-input type="textarea" v-model="textConfig.bottom" placeholder="底部"/>
            </Form-item>
            <Form-item label="类型" prop="type">
                <i-select v-model="textConfig.type">
                    <i-option value="1">邀请</i-option>
                    <i-option value="2">分享</i-option>
                    <i-option value="3">闪兑</i-option>
                    <i-option value="7">报名</i-option>
                    <i-option value="5">竞拍</i-option>
                    <i-option value="6">抢购</i-option>
                </i-select>
            </Form-item>
            <Form-item label="描述说明" prop="comment">
                <i-input type="textarea" v-model="textConfig.comment" placeholder="描述说明"/>
            </Form-item>
            <Form-item label="Done文字" prop="done">
                <i-input v-model="textConfig.done" placeholder="Done文字"/>
            </Form-item>
            <Form-item label="非Done文字" prop="nodone">
                <i-input v-model="textConfig.nodone" placeholder="非Done文字"/>
            </Form-item>
            <Form-item label="状态" prop="status">
                <i-input v-model="textConfig.status" placeholder="默认写1"/>
            </Form-item>
            <Form-item label="html页面详情" prop="htmlComment">
                <div id="htmlComment"></div>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
	</Card>
</div>

<script src="${rc.contextPath}/js/cms/textconfig.js?_${date.systemTime}"></script>
</body>
<style>
    .ui-jqgrid tr.jqgrow td { white-space: normal !important; height:auto; }
</style>
</html>